{% import "TopxiaWebBundle::macro.html.twig" as web_macro %}
{#登录后#}
{% if app.user %}
<div class="modal-dialog modal-card-pack modal-logined">
  <div class="modal-content">
    <div class="modal-body">
      <div class="modal-info">
        您领取了一张{% if cardType is defined and cardType == "coupon" %}优惠券{% endif %}{% if cardType is defined and cardType == "moneyCard" %}学习卡{% endif %}，已添加至“我的卡包“
      </div>
      {#卡券内容#}
      {% if cardId is not null and cardDetail is not null and cardType == "coupon" %}
        {% include 'TopxiaWebBundle:Card:coupon-useable.html.twig' %}
      {% endif %}
      {% if cardId is not null and cardDetail is not null and cardType == "moneyCard" %}
        {% include 'TopxiaWebBundle:Card:moneycard-useable.html.twig' %}
      {% endif %}
      <div class="modal-action">
        <a href="" class="btn btn-ghost-white btn-xlg" data-dismiss="modal">关闭</a>
      </div>
    </div>
  </div>
</div>
{% else %}

{#登录前#}
<div class="modal-dialog modal-card-pack">
  <div class="modal-content">
    <div class="modal-body">
      <div class="modal-info">
        您还没有登录，请在登录后领取。
      </div>
      {% if cardId is not null and cardDetail is not null and cardType == "coupon" %}
        {% include 'TopxiaWebBundle:Card:coupon-useable.html.twig' %}
      {% endif %}
      {% if cardId is not null and cardDetail is not null and cardType == "moneyCard" %}
        {% include 'TopxiaWebBundle:Card:moneycard-useable.html.twig' %}
      {% endif %}
      <div class="modal-action">
        <a href="" class="btn btn-ghost-white btn-xlg" data-dismiss="modal" >登录查看</a>
      </div>
    </div>
  </div>
</div>
{% endif %}